home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-11-19 | 1.1 KB | 48 lines | [TEXT/MPS ] |
- {
- File: SampleLibrary.h
-
- Contains: Interface for everything that the PSampleLibrary exports including
- the functions of the traffic light function set.
-
- Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
-
- }
-
- UNIT SampleLibrary;
-
- INTERFACE
-
- USES
- MemTypes, QuickDraw, OSIntf, ToolIntf, PackIntf, Traps, LibraryManager,
- LibraryManagerUtilities;
-
- TYPE
- TTrafficLight = LongIntPtr; { our instance of TrafficLight class }
-
- CONST
- kTrafficLightLibID = 'slm:samp$PTrafficLight';
- kTrafficLightFunctionSet= 'slm:samp$PTrafficLightFunctionSet,1.1';
-
- rWindow = 128; {application's window}
- rStopRect = 128; {rectangle for Stop light}
- rGoRect = 129; {rectangle for Go light}
-
- mLight = 131; {Light menu}
- iStop = 1;
- iGo = 2;
-
- { PROCEDURES AND FUNCTIONS PROTOTYPES }
-
- FUNCTION NewTrafficLight : OSErr;
- PROCEDURE FreeTrafficLight;
- FUNCTION GetLightState : BOOLEAN;
- PROCEDURE SetLightState( newState : BOOLEAN );
- PROCEDURE DrawLight;
- PROCEDURE AdjustTrafficLightMenus( active: BOOLEAN );
- PROCEDURE DoTrafficLightMenuCommand( menuItem: INTEGER );
-
- IMPLEMENTATION
-
- {$I SampleLibrary.inc.p}
-
- END.